//职位模块
import React, { Component } from 'react'
import {
    View,
    Text,
    AppRegistry,
    AsyncStorage,
    TouchableOpacity,
    StyleSheet,
} from 'react-native';

import { connect } from '../../../utils/dva';
// import { Tow as styles } from '../../../styles/index'
import { Button, CheckBox } from 'react-native-elements';



@connect(({ global }) => ({

}))
export default class Postion extends Component {
    constructor(props) {
        super(props)
    }

    render() {

        global.storage.save({
            key: 'loginState',  // 注意:请不要在key中使用_下划线符号!
            data: {
                from: [0,1,2],
                userid: 'some userid',
                token: 'some token'
            },
            // 如果不指定过期时间，则会使用defaultExpires参数
            // 如果设为null，则永不过期
            expires: 1000 * 3600
        });

        global.storage.load({
            key: 'loginState',
        }).then((rs)=>{
            console.log(rs)
            console.log('hahahaah')
        })

        return (
            <View style={{ flex: 1, backgroundColor: '#fff' }}>
                <View style={{ height: 200,width:'50%', backgroundColor: 'red' }}>

                </View>
                <TouchableOpacity
                    onPress={() => {
                        this.props.navigation.push('Hehe')
                    }}>

                    <Text > 跳转页面</Text>
                </TouchableOpacity>
                <Button title='BUTTON' />
                <Button title='BUTTON'
                    style={styles.aaa}
                />
                <CheckBox
                    title='Click Here'
                    checked={true}
                />

                <CheckBox
                    center
                    title='Click Here'
                    checked={true}
                />


            </View>
        )
    }
}

let styles = StyleSheet.create({
    aaa: {
        width: '50%',
    },

})
